﻿// -----------------------------------------------------------------------
// <copyright file="FileStatesModel.cs" company="Microsoft">
// TODO: Update copyright text.
// </copyright>
// -----------------------------------------------------------------------

namespace RRSync.Lib.Models
{
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Runtime.Serialization;

    /// <summary>
    /// TODO: Update summary.
    /// </summary>
    [Serializable]
    public class FileStatesModel : ISerializable
    {
        private const string FILE_STATES_NAME = "FileStates";

        public FileStatesModel()
        {
            this.FileStates = new Dictionary<string, FileStateModel>();
        }

        public FileStatesModel(SerializationInfo info, StreamingContext context)
        {
            this.FileStates = info.GetValue(FILE_STATES_NAME, typeof(Dictionary<string, FileStateModel>)) as Dictionary<string, FileStateModel>;
        }

        public IDictionary<string, FileStateModel> FileStates { get; set; }

        public void GetObjectData(SerializationInfo info, StreamingContext context)
        {
            info.AddValue(FILE_STATES_NAME, this.FileStates);
        }
    }
}
